import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/components/Home.vue'),
    children: [
      {
        path: '/account',
        name: 'Account',
        component: () => import('@/components/account/Account.vue')
      },
      {
        path: '/stream',
        name: 'Stream',
        component: () => import('@/components/detail/Stream.vue')
      },
      {
        path: '/gain',
        name: 'Gain',
        component: () => import('@/components/detail/Gain.vue')
      },
      {
        path: '/budget',
        name: 'Budget',
        component: () => import('@/components/analyze/Budget.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
